package cn.madis.ymcc;

import cn.madis.ymcc.domain.User;
import cn.madis.ymcc.fallback.UserFeignClientFallbackFactory;

import cn.madis.ymcc.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

@FeignClient(value = "service-user",fallbackFactory = UserFeignClientFallbackFactory.class)
public interface UserFeignClient {
    /**
     * 查询所有对象
     */
    @RequestMapping(value = "/user/list",method = RequestMethod.GET)
    JSONResult<List<User>> list();
}
